package org.algorithm.落雪.数组.三月.第四周;

/**
 * @author zhx
 * @version 1.0
 * @date 2022/03/24 8:38 PM
 * @description: 周五
 *
 *
 * url: https://leetcode-cn.com/problems/qing-wa-tiao-tai-jie-wen-ti-lcof/
 */
public class 青蛙跳台阶 {

    public static void main(String[] args) {

        System.out.println(test(10));

    }

    public static int test(int n) {
        int a = 1, b = 1, sum = 0;
        for (int i = 1; i < n; i++) {
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }

        return b;
    }

}
